package face.pay.api.payter;

import com.alibaba.fastjson.JSONObject;
import face.pay.api.payter.channel.AbstractChannel;
import face.pay.api.payter.channel.WxPayChannel;
import face.pay.util.ResultMessage;
import face.pay.util.SpringUtil;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * 微信渠道支
 */
@Slf4j
@Component("weChatPayTerminal")
public class WeChatPayTerminal extends AbstractPayTerminal {

    @Override
    public ResultMessage payResult(String json) {
        return null;
    }

    @Override
    public AbstractChannel channel(JSONObject json) {

        log.info("微信设备收款 商户渠道选择");

        /**
         * 根据device_id 查询设备所属商户
         */
        return SpringUtil.getBean(WxPayChannel.class);
    }
}
